import axios from './axios.js'

export const getRoleList = (params) => {
	return axios.request({
		 url: 'api/system/role/list',
		 method: 'get',
		 params
	})
}

export function addRole(data) {
  return axios.request({
    url: 'api/system/role',
    method: 'post',
    data: data
  })
}

export function updateRole(data) {
  return axios.request({
    url: 'api/system/role',
    method: 'put',
    data: data
  })
}

export function delRole(id) {
  return axios.request({
    url: 'api/system/role/'+id,
    method: 'delete'
  })
}

// export const getMenuTree = () => {
// 	return axios.request({
// 		url: '/menu/getMenuTree',
// 		method: 'get'
// 	})
// }